<?php

use yii\helpers\Html;
use common\components\ActiveForm;
use yii\helpers\Url;


/* @var $this yii\web\View */
/* @var $model common\models\menu */
/* @var $form yii\widgets\ActiveForm */
?>

<hr/>
<div class="menu-form">

	<?php $form = ActiveForm::begin(); ?>

	<?= $form->field($model, 'title')->textInput(['maxlength' => 50])->label(null, [
		'class' => 'col-sm-2 control-label'
	]) ?>

	<?= $form->field($model, 'url')->textInput(['maxlength' => 50])->label(null, [
		'class' => 'col-sm-2 control-label'
	]) ?>

	<?= $form->field($model, 'sort')->textInput(['maxlength' => 10, 'value' => 10])->label(null, [
		'class' => 'col-sm-2 control-label'
	]) ?>

	<?= $form->field($model, 'status')->dropDownList([
		'1' => '正常',
		'0' => '禁用'
	])->label(null, [
		'class' => 'col-sm-2 control-label'
	]) ?>

	<div class="form-group">
		<div class="col-xs-2"></div>
		<?= Html::submitButton($model->isNewRecord ? '创建' : '更新', ['class' => $model->isNewRecord ? 'btn btn-success word-btn' : 'btn btn-primary word-btn']) ?>
	</div>

	<?php ActiveForm::end(); ?>

</div>
<script>
	<?php $this->beginBlock('js_end') ?>
	$(function(){
		highlight_subnav("<?= Url::to(['channel/index']) ?>");
	});
	<?php $this->endBlock() ?>
</script>
<?php $this->registerJs($this->blocks['js_end'], \yii\web\View::POS_END); ?>

